package kr.co.icebird.swt.app.ch4;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.jface.resource.ImageDescriptor;

public class Ch4_StatusAction extends Action {

	StatusLineManager statman;
	short triggercount = 0;

	public Ch4_StatusAction(StatusLineManager sm) {

		super("&Trigger@Ctrl+T", AS_PUSH_BUTTON);
		statman = sm;
		setToolTipText("Trigger the Action");
		setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(),
				"test.jpg"));
	}

	public void run() {
		triggercount++;
		statman.setMessage("The status action has fired. Count : "
				+ triggercount);
	}
}
